//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import SotoCore

/// Error enum for CodeCommit
public struct CodeCommitErrorType: AWSErrorType {
    enum Code: String {
        case actorDoesNotExistException = "ActorDoesNotExistException"
        case approvalRuleContentRequiredException = "ApprovalRuleContentRequiredException"
        case approvalRuleDoesNotExistException = "ApprovalRuleDoesNotExistException"
        case approvalRuleNameAlreadyExistsException = "ApprovalRuleNameAlreadyExistsException"
        case approvalRuleNameRequiredException = "ApprovalRuleNameRequiredException"
        case approvalRuleTemplateContentRequiredException = "ApprovalRuleTemplateContentRequiredException"
        case approvalRuleTemplateDoesNotExistException = "ApprovalRuleTemplateDoesNotExistException"
        case approvalRuleTemplateInUseException = "ApprovalRuleTemplateInUseException"
        case approvalRuleTemplateNameAlreadyExistsException = "ApprovalRuleTemplateNameAlreadyExistsException"
        case approvalRuleTemplateNameRequiredException = "ApprovalRuleTemplateNameRequiredException"
        case approvalStateRequiredException = "ApprovalStateRequiredException"
        case authorDoesNotExistException = "AuthorDoesNotExistException"
        case beforeCommitIdAndAfterCommitIdAreSameException = "BeforeCommitIdAndAfterCommitIdAreSameException"
        case blobIdDoesNotExistException = "BlobIdDoesNotExistException"
        case blobIdRequiredException = "BlobIdRequiredException"
        case branchDoesNotExistException = "BranchDoesNotExistException"
        case branchNameExistsException = "BranchNameExistsException"
        case branchNameIsTagNameException = "BranchNameIsTagNameException"
        case branchNameRequiredException = "BranchNameRequiredException"
        case cannotDeleteApprovalRuleFromTemplateException = "CannotDeleteApprovalRuleFromTemplateException"
        case cannotModifyApprovalRuleFromTemplateException = "CannotModifyApprovalRuleFromTemplateException"
        case clientRequestTokenRequiredException = "ClientRequestTokenRequiredException"
        case commentContentRequiredException = "CommentContentRequiredException"
        case commentContentSizeLimitExceededException = "CommentContentSizeLimitExceededException"
        case commentDeletedException = "CommentDeletedException"
        case commentDoesNotExistException = "CommentDoesNotExistException"
        case commentIdRequiredException = "CommentIdRequiredException"
        case commentNotCreatedByCallerException = "CommentNotCreatedByCallerException"
        case commitDoesNotExistException = "CommitDoesNotExistException"
        case commitIdDoesNotExistException = "CommitIdDoesNotExistException"
        case commitIdRequiredException = "CommitIdRequiredException"
        case commitIdsLimitExceededException = "CommitIdsLimitExceededException"
        case commitIdsListRequiredException = "CommitIdsListRequiredException"
        case commitMessageLengthExceededException = "CommitMessageLengthExceededException"
        case commitRequiredException = "CommitRequiredException"
        case concurrentReferenceUpdateException = "ConcurrentReferenceUpdateException"
        case defaultBranchCannotBeDeletedException = "DefaultBranchCannotBeDeletedException"
        case directoryNameConflictsWithFileNameException = "DirectoryNameConflictsWithFileNameException"
        case encryptionIntegrityChecksFailedException = "EncryptionIntegrityChecksFailedException"
        case encryptionKeyAccessDeniedException = "EncryptionKeyAccessDeniedException"
        case encryptionKeyDisabledException = "EncryptionKeyDisabledException"
        case encryptionKeyNotFoundException = "EncryptionKeyNotFoundException"
        case encryptionKeyUnavailableException = "EncryptionKeyUnavailableException"
        case fileContentAndSourceFileSpecifiedException = "FileContentAndSourceFileSpecifiedException"
        case fileContentRequiredException = "FileContentRequiredException"
        case fileContentSizeLimitExceededException = "FileContentSizeLimitExceededException"
        case fileDoesNotExistException = "FileDoesNotExistException"
        case fileEntryRequiredException = "FileEntryRequiredException"
        case fileModeRequiredException = "FileModeRequiredException"
        case fileNameConflictsWithDirectoryNameException = "FileNameConflictsWithDirectoryNameException"
        case filePathConflictsWithSubmodulePathException = "FilePathConflictsWithSubmodulePathException"
        case fileTooLargeException = "FileTooLargeException"
        case folderContentSizeLimitExceededException = "FolderContentSizeLimitExceededException"
        case folderDoesNotExistException = "FolderDoesNotExistException"
        case idempotencyParameterMismatchException = "IdempotencyParameterMismatchException"
        case invalidActorArnException = "InvalidActorArnException"
        case invalidApprovalRuleContentException = "InvalidApprovalRuleContentException"
        case invalidApprovalRuleNameException = "InvalidApprovalRuleNameException"
        case invalidApprovalRuleTemplateContentException = "InvalidApprovalRuleTemplateContentException"
        case invalidApprovalRuleTemplateDescriptionException = "InvalidApprovalRuleTemplateDescriptionException"
        case invalidApprovalRuleTemplateNameException = "InvalidApprovalRuleTemplateNameException"
        case invalidApprovalStateException = "InvalidApprovalStateException"
        case invalidAuthorArnException = "InvalidAuthorArnException"
        case invalidBlobIdException = "InvalidBlobIdException"
        case invalidBranchNameException = "InvalidBranchNameException"
        case invalidClientRequestTokenException = "InvalidClientRequestTokenException"
        case invalidCommentIdException = "InvalidCommentIdException"
        case invalidCommitException = "InvalidCommitException"
        case invalidCommitIdException = "InvalidCommitIdException"
        case invalidConflictDetailLevelException = "InvalidConflictDetailLevelException"
        case invalidConflictResolutionException = "InvalidConflictResolutionException"
        case invalidConflictResolutionStrategyException = "InvalidConflictResolutionStrategyException"
        case invalidContinuationTokenException = "InvalidContinuationTokenException"
        case invalidDeletionParameterException = "InvalidDeletionParameterException"
        case invalidDescriptionException = "InvalidDescriptionException"
        case invalidDestinationCommitSpecifierException = "InvalidDestinationCommitSpecifierException"
        case invalidEmailException = "InvalidEmailException"
        case invalidFileLocationException = "InvalidFileLocationException"
        case invalidFileModeException = "InvalidFileModeException"
        case invalidFilePositionException = "InvalidFilePositionException"
        case invalidMaxConflictFilesException = "InvalidMaxConflictFilesException"
        case invalidMaxMergeHunksException = "InvalidMaxMergeHunksException"
        case invalidMaxResultsException = "InvalidMaxResultsException"
        case invalidMergeOptionException = "InvalidMergeOptionException"
        case invalidOrderException = "InvalidOrderException"
        case invalidOverrideStatusException = "InvalidOverrideStatusException"
        case invalidParentCommitIdException = "InvalidParentCommitIdException"
        case invalidPathException = "InvalidPathException"
        case invalidPullRequestEventTypeException = "InvalidPullRequestEventTypeException"
        case invalidPullRequestIdException = "InvalidPullRequestIdException"
        case invalidPullRequestStatusException = "InvalidPullRequestStatusException"
        case invalidPullRequestStatusUpdateException = "InvalidPullRequestStatusUpdateException"
        case invalidReactionUserArnException = "InvalidReactionUserArnException"
        case invalidReactionValueException = "InvalidReactionValueException"
        case invalidReferenceNameException = "InvalidReferenceNameException"
        case invalidRelativeFileVersionEnumException = "InvalidRelativeFileVersionEnumException"
        case invalidReplacementContentException = "InvalidReplacementContentException"
        case invalidReplacementTypeException = "InvalidReplacementTypeException"
        case invalidRepositoryDescriptionException = "InvalidRepositoryDescriptionException"
        case invalidRepositoryNameException = "InvalidRepositoryNameException"
        case invalidRepositoryTriggerBranchNameException = "InvalidRepositoryTriggerBranchNameException"
        case invalidRepositoryTriggerCustomDataException = "InvalidRepositoryTriggerCustomDataException"
        case invalidRepositoryTriggerDestinationArnException = "InvalidRepositoryTriggerDestinationArnException"
        case invalidRepositoryTriggerEventsException = "InvalidRepositoryTriggerEventsException"
        case invalidRepositoryTriggerNameException = "InvalidRepositoryTriggerNameException"
        case invalidRepositoryTriggerRegionException = "InvalidRepositoryTriggerRegionException"
        case invalidResourceArnException = "InvalidResourceArnException"
        case invalidRevisionIdException = "InvalidRevisionIdException"
        case invalidRuleContentSha256Exception = "InvalidRuleContentSha256Exception"
        case invalidSortByException = "InvalidSortByException"
        case invalidSourceCommitSpecifierException = "InvalidSourceCommitSpecifierException"
        case invalidSystemTagUsageException = "InvalidSystemTagUsageException"
        case invalidTagKeysListException = "InvalidTagKeysListException"
        case invalidTagsMapException = "InvalidTagsMapException"
        case invalidTargetBranchException = "InvalidTargetBranchException"
        case invalidTargetException = "InvalidTargetException"
        case invalidTargetsException = "InvalidTargetsException"
        case invalidTitleException = "InvalidTitleException"
        case manualMergeRequiredException = "ManualMergeRequiredException"
        case maximumBranchesExceededException = "MaximumBranchesExceededException"
        case maximumConflictResolutionEntriesExceededException = "MaximumConflictResolutionEntriesExceededException"
        case maximumFileContentToLoadExceededException = "MaximumFileContentToLoadExceededException"
        case maximumFileEntriesExceededException = "MaximumFileEntriesExceededException"
        case maximumItemsToCompareExceededException = "MaximumItemsToCompareExceededException"
        case maximumNumberOfApprovalsExceededException = "MaximumNumberOfApprovalsExceededException"
        case maximumOpenPullRequestsExceededException = "MaximumOpenPullRequestsExceededException"
        case maximumRepositoryNamesExceededException = "MaximumRepositoryNamesExceededException"
        case maximumRepositoryTriggersExceededException = "MaximumRepositoryTriggersExceededException"
        case maximumRuleTemplatesAssociatedWithRepositoryException = "MaximumRuleTemplatesAssociatedWithRepositoryException"
        case mergeOptionRequiredException = "MergeOptionRequiredException"
        case multipleConflictResolutionEntriesException = "MultipleConflictResolutionEntriesException"
        case multipleRepositoriesInPullRequestException = "MultipleRepositoriesInPullRequestException"
        case nameLengthExceededException = "NameLengthExceededException"
        case noChangeException = "NoChangeException"
        case numberOfRuleTemplatesExceededException = "NumberOfRuleTemplatesExceededException"
        case numberOfRulesExceededException = "NumberOfRulesExceededException"
        case overrideAlreadySetException = "OverrideAlreadySetException"
        case overrideStatusRequiredException = "OverrideStatusRequiredException"
        case parentCommitDoesNotExistException = "ParentCommitDoesNotExistException"
        case parentCommitIdOutdatedException = "ParentCommitIdOutdatedException"
        case parentCommitIdRequiredException = "ParentCommitIdRequiredException"
        case pathDoesNotExistException = "PathDoesNotExistException"
        case pathRequiredException = "PathRequiredException"
        case pullRequestAlreadyClosedException = "PullRequestAlreadyClosedException"
        case pullRequestApprovalRulesNotSatisfiedException = "PullRequestApprovalRulesNotSatisfiedException"
        case pullRequestCannotBeApprovedByAuthorException = "PullRequestCannotBeApprovedByAuthorException"
        case pullRequestDoesNotExistException = "PullRequestDoesNotExistException"
        case pullRequestIdRequiredException = "PullRequestIdRequiredException"
        case pullRequestStatusRequiredException = "PullRequestStatusRequiredException"
        case putFileEntryConflictException = "PutFileEntryConflictException"
        case reactionLimitExceededException = "ReactionLimitExceededException"
        case reactionValueRequiredException = "ReactionValueRequiredException"
        case referenceDoesNotExistException = "ReferenceDoesNotExistException"
        case referenceNameRequiredException = "ReferenceNameRequiredException"
        case referenceTypeNotSupportedException = "ReferenceTypeNotSupportedException"
        case replacementContentRequiredException = "ReplacementContentRequiredException"
        case replacementTypeRequiredException = "ReplacementTypeRequiredException"
        case repositoryDoesNotExistException = "RepositoryDoesNotExistException"
        case repositoryLimitExceededException = "RepositoryLimitExceededException"
        case repositoryNameExistsException = "RepositoryNameExistsException"
        case repositoryNameRequiredException = "RepositoryNameRequiredException"
        case repositoryNamesRequiredException = "RepositoryNamesRequiredException"
        case repositoryNotAssociatedWithPullRequestException = "RepositoryNotAssociatedWithPullRequestException"
        case repositoryTriggerBranchNameListRequiredException = "RepositoryTriggerBranchNameListRequiredException"
        case repositoryTriggerDestinationArnRequiredException = "RepositoryTriggerDestinationArnRequiredException"
        case repositoryTriggerEventsListRequiredException = "RepositoryTriggerEventsListRequiredException"
        case repositoryTriggerNameRequiredException = "RepositoryTriggerNameRequiredException"
        case repositoryTriggersListRequiredException = "RepositoryTriggersListRequiredException"
        case resourceArnRequiredException = "ResourceArnRequiredException"
        case restrictedSourceFileException = "RestrictedSourceFileException"
        case revisionIdRequiredException = "RevisionIdRequiredException"
        case revisionNotCurrentException = "RevisionNotCurrentException"
        case sameFileContentException = "SameFileContentException"
        case samePathRequestException = "SamePathRequestException"
        case sourceAndDestinationAreSameException = "SourceAndDestinationAreSameException"
        case sourceFileOrContentRequiredException = "SourceFileOrContentRequiredException"
        case tagKeysListRequiredException = "TagKeysListRequiredException"
        case tagPolicyException = "TagPolicyException"
        case tagsMapRequiredException = "TagsMapRequiredException"
        case targetRequiredException = "TargetRequiredException"
        case targetsRequiredException = "TargetsRequiredException"
        case tipOfSourceReferenceIsDifferentException = "TipOfSourceReferenceIsDifferentException"
        case tipsDivergenceExceededException = "TipsDivergenceExceededException"
        case titleRequiredException = "TitleRequiredException"
        case tooManyTagsException = "TooManyTagsException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CodeCommit
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The specified Amazon Resource Name (ARN) does not exist in the AWS account.
    public static var actorDoesNotExistException: Self { .init(.actorDoesNotExistException) }
    /// The content for the approval rule is empty. You must provide some content for an approval rule. The content cannot be null.
    public static var approvalRuleContentRequiredException: Self { .init(.approvalRuleContentRequiredException) }
    /// The specified approval rule does not exist.
    public static var approvalRuleDoesNotExistException: Self { .init(.approvalRuleDoesNotExistException) }
    /// An approval rule with that name already exists. Approval rule names must be unique within the scope of a pull request.
    public static var approvalRuleNameAlreadyExistsException: Self { .init(.approvalRuleNameAlreadyExistsException) }
    /// An approval rule name is required, but was not specified.
    public static var approvalRuleNameRequiredException: Self { .init(.approvalRuleNameRequiredException) }
    /// The content for the approval rule template is empty. You must provide some content for an approval rule template. The content cannot be null.
    public static var approvalRuleTemplateContentRequiredException: Self { .init(.approvalRuleTemplateContentRequiredException) }
    /// The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the AWS Region where the template was created, and then try again.
    public static var approvalRuleTemplateDoesNotExistException: Self { .init(.approvalRuleTemplateDoesNotExistException) }
    /// The approval rule template is associated with one or more repositories. You cannot delete a template that is associated with a repository. Remove all associations, and then try again.
    public static var approvalRuleTemplateInUseException: Self { .init(.approvalRuleTemplateInUseException) }
    /// You cannot create an approval rule template with that name because a template with that name already exists in this AWS Region for your AWS account. Approval rule template names must be unique.
    public static var approvalRuleTemplateNameAlreadyExistsException: Self { .init(.approvalRuleTemplateNameAlreadyExistsException) }
    /// An approval rule template name is required, but was not specified.
    public static var approvalRuleTemplateNameRequiredException: Self { .init(.approvalRuleTemplateNameRequiredException) }
    /// An approval state is required, but was not specified.
    public static var approvalStateRequiredException: Self { .init(.approvalStateRequiredException) }
    /// The specified Amazon Resource Name (ARN) does not exist in the AWS account.
    public static var authorDoesNotExistException: Self { .init(.authorDoesNotExistException) }
    /// The before commit ID and the after commit ID are the same, which is not valid. The before commit ID and the after commit ID must be different commit IDs.
    public static var beforeCommitIdAndAfterCommitIdAreSameException: Self { .init(.beforeCommitIdAndAfterCommitIdAreSameException) }
    /// The specified blob does not exist.
    public static var blobIdDoesNotExistException: Self { .init(.blobIdDoesNotExistException) }
    /// A blob ID is required, but was not specified.
    public static var blobIdRequiredException: Self { .init(.blobIdRequiredException) }
    /// The specified branch does not exist.
    public static var branchDoesNotExistException: Self { .init(.branchDoesNotExistException) }
    /// Cannot create the branch with the specified name because the commit conflicts with an existing branch with the same name. Branch names must be unique.
    public static var branchNameExistsException: Self { .init(.branchNameExistsException) }
    /// The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use ListBranches.
    public static var branchNameIsTagNameException: Self { .init(.branchNameIsTagNameException) }
    /// A branch name is required, but was not specified.
    public static var branchNameRequiredException: Self { .init(.branchNameRequiredException) }
    /// The approval rule cannot be deleted from the pull request because it was created by an approval rule template and applied to the pull request automatically.
    public static var cannotDeleteApprovalRuleFromTemplateException: Self { .init(.cannotDeleteApprovalRuleFromTemplateException) }
    /// The approval rule cannot be modified for the pull request because it was created by an approval rule template and applied to the pull request automatically.
    public static var cannotModifyApprovalRuleFromTemplateException: Self { .init(.cannotModifyApprovalRuleFromTemplateException) }
    /// A client request token is required. A client request token is an unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.
    public static var clientRequestTokenRequiredException: Self { .init(.clientRequestTokenRequiredException) }
    /// The comment is empty. You must provide some content for a comment. The content cannot be null.
    public static var commentContentRequiredException: Self { .init(.commentContentRequiredException) }
    /// The comment is too large. Comments are limited to 1,000 characters.
    public static var commentContentSizeLimitExceededException: Self { .init(.commentContentSizeLimitExceededException) }
    /// This comment has already been deleted. You cannot edit or delete a deleted comment.
    public static var commentDeletedException: Self { .init(.commentDeletedException) }
    /// No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
    public static var commentDoesNotExistException: Self { .init(.commentDoesNotExistException) }
    /// The comment ID is missing or null. A comment ID is required.
    public static var commentIdRequiredException: Self { .init(.commentIdRequiredException) }
    /// You cannot modify or delete this comment. Only comment authors can modify or delete their comments.
    public static var commentNotCreatedByCallerException: Self { .init(.commentNotCreatedByCallerException) }
    /// The specified commit does not exist or no commit was specified, and the specified repository has no default branch.
    public static var commitDoesNotExistException: Self { .init(.commitDoesNotExistException) }
    /// The specified commit ID does not exist.
    public static var commitIdDoesNotExistException: Self { .init(.commitIdDoesNotExistException) }
    /// A commit ID was not specified.
    public static var commitIdRequiredException: Self { .init(.commitIdRequiredException) }
    /// The maximum number of allowed commit IDs in a batch request is 100. Verify that your batch requests contains no more than 100 commit IDs, and then try again.
    public static var commitIdsLimitExceededException: Self { .init(.commitIdsLimitExceededException) }
    /// A list of commit IDs is required, but was either not specified or the list was empty.
    public static var commitIdsListRequiredException: Self { .init(.commitIdsListRequiredException) }
    /// The commit message is too long. Provide a shorter string.
    public static var commitMessageLengthExceededException: Self { .init(.commitMessageLengthExceededException) }
    /// A commit was not specified.
    public static var commitRequiredException: Self { .init(.commitRequiredException) }
    /// The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.
    public static var concurrentReferenceUpdateException: Self { .init(.concurrentReferenceUpdateException) }
    /// The specified branch is the default branch for the repository, and cannot be deleted. To delete this branch, you must first set another branch as the default branch.
    public static var defaultBranchCannotBeDeletedException: Self { .init(.defaultBranchCannotBeDeletedException) }
    /// A file cannot be added to the repository because the specified path name has the same name as a file that already exists in this repository. Either provide a different name for the file, or specify a different path for the file.
    public static var directoryNameConflictsWithFileNameException: Self { .init(.directoryNameConflictsWithFileNameException) }
    /// An encryption integrity check failed.
    public static var encryptionIntegrityChecksFailedException: Self { .init(.encryptionIntegrityChecksFailedException) }
    /// An encryption key could not be accessed.
    public static var encryptionKeyAccessDeniedException: Self { .init(.encryptionKeyAccessDeniedException) }
    /// The encryption key is disabled.
    public static var encryptionKeyDisabledException: Self { .init(.encryptionKeyDisabledException) }
    /// No encryption key was found.
    public static var encryptionKeyNotFoundException: Self { .init(.encryptionKeyNotFoundException) }
    /// The encryption key is not available.
    public static var encryptionKeyUnavailableException: Self { .init(.encryptionKeyUnavailableException) }
    /// The commit cannot be created because both a source file and file content have been specified for the same file. You cannot provide both. Either specify a source file or provide the file content directly.
    public static var fileContentAndSourceFileSpecifiedException: Self { .init(.fileContentAndSourceFileSpecifiedException) }
    /// The file cannot be added because it is empty. Empty files cannot be added to the repository with this API.
    public static var fileContentRequiredException: Self { .init(.fileContentRequiredException) }
    /// The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.
    public static var fileContentSizeLimitExceededException: Self { .init(.fileContentSizeLimitExceededException) }
    /// The specified file does not exist. Verify that you have used the correct file name, full path, and extension.
    public static var fileDoesNotExistException: Self { .init(.fileDoesNotExistException) }
    /// The commit cannot be created because no files have been specified as added, updated, or changed (PutFile or DeleteFile) for the commit.
    public static var fileEntryRequiredException: Self { .init(.fileEntryRequiredException) }
    /// The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.
    public static var fileModeRequiredException: Self { .init(.fileModeRequiredException) }
    /// A file cannot be added to the repository because the specified file name has the same name as a directory in this repository. Either provide another name for the file, or add the file in a directory that does not match the file name.
    public static var fileNameConflictsWithDirectoryNameException: Self { .init(.fileNameConflictsWithDirectoryNameException) }
    /// The commit cannot be created because a specified file path points to a submodule. Verify that the destination files have valid file paths that do not point to a submodule.
    public static var filePathConflictsWithSubmodulePathException: Self { .init(.filePathConflictsWithSubmodulePathException) }
    /// The specified file exceeds the file size limit for AWS CodeCommit. For more information about limits in AWS CodeCommit, see AWS CodeCommit User Guide.
    public static var fileTooLargeException: Self { .init(.fileTooLargeException) }
    /// The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.
    public static var folderContentSizeLimitExceededException: Self { .init(.folderContentSizeLimitExceededException) }
    /// The specified folder does not exist. Either the folder name is not correct, or you did not enter the full path to the folder.
    public static var folderDoesNotExistException: Self { .init(.folderDoesNotExistException) }
    /// The client request token is not valid. Either the token is not in a valid format, or the token has been used in a previous request and cannot be reused.
    public static var idempotencyParameterMismatchException: Self { .init(.idempotencyParameterMismatchException) }
    /// The Amazon Resource Name (ARN) is not valid. Make sure that you have provided the full ARN for the user who initiated the change for the pull request, and then try again.
    public static var invalidActorArnException: Self { .init(.invalidActorArnException) }
    /// The content for the approval rule is not valid.
    public static var invalidApprovalRuleContentException: Self { .init(.invalidApprovalRuleContentException) }
    /// The name for the approval rule is not valid.
    public static var invalidApprovalRuleNameException: Self { .init(.invalidApprovalRuleNameException) }
    /// The content of the approval rule template is not valid.
    public static var invalidApprovalRuleTemplateContentException: Self { .init(.invalidApprovalRuleTemplateContentException) }
    /// The description for the approval rule template is not valid because it exceeds the maximum characters allowed for a description. For more information about limits in AWS CodeCommit, see AWS CodeCommit User Guide.
    public static var invalidApprovalRuleTemplateDescriptionException: Self { .init(.invalidApprovalRuleTemplateDescriptionException) }
    /// The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in AWS CodeCommit, see AWS CodeCommit User Guide.
    public static var invalidApprovalRuleTemplateNameException: Self { .init(.invalidApprovalRuleTemplateNameException) }
    /// The state for the approval is not valid. Valid values include APPROVE and REVOKE.
    public static var invalidApprovalStateException: Self { .init(.invalidApprovalStateException) }
    /// The Amazon Resource Name (ARN) is not valid. Make sure that you have provided the full ARN for the author of the pull request, and then try again.
    public static var invalidAuthorArnException: Self { .init(.invalidAuthorArnException) }
    /// The specified blob is not valid.
    public static var invalidBlobIdException: Self { .init(.invalidBlobIdException) }
    /// The specified reference name is not valid.
    public static var invalidBranchNameException: Self { .init(.invalidBranchNameException) }
    /// The client request token is not valid.
    public static var invalidClientRequestTokenException: Self { .init(.invalidClientRequestTokenException) }
    /// The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
    public static var invalidCommentIdException: Self { .init(.invalidCommentIdException) }
    /// The specified commit is not valid.
    public static var invalidCommitException: Self { .init(.invalidCommitException) }
    /// The specified commit ID is not valid.
    public static var invalidCommitIdException: Self { .init(.invalidCommitIdException) }
    /// The specified conflict detail level is not valid.
    public static var invalidConflictDetailLevelException: Self { .init(.invalidConflictDetailLevelException) }
    /// The specified conflict resolution list is not valid.
    public static var invalidConflictResolutionException: Self { .init(.invalidConflictResolutionException) }
    /// The specified conflict resolution strategy is not valid.
    public static var invalidConflictResolutionStrategyException: Self { .init(.invalidConflictResolutionStrategyException) }
    /// The specified continuation token is not valid.
    public static var invalidContinuationTokenException: Self { .init(.invalidContinuationTokenException) }
    /// The specified deletion parameter is not valid.
    public static var invalidDeletionParameterException: Self { .init(.invalidDeletionParameterException) }
    /// The pull request description is not valid. Descriptions cannot be more than 1,000 characters.
    public static var invalidDescriptionException: Self { .init(.invalidDescriptionException) }
    /// The destination commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
    public static var invalidDestinationCommitSpecifierException: Self { .init(.invalidDestinationCommitSpecifierException) }
    /// The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.
    public static var invalidEmailException: Self { .init(.invalidEmailException) }
    /// The location of the file is not valid. Make sure that you include the file name and extension.
    public static var invalidFileLocationException: Self { .init(.invalidFileLocationException) }
    /// The specified file mode permission is not valid. For a list of valid file mode permissions, see PutFile.
    public static var invalidFileModeException: Self { .init(.invalidFileModeException) }
    /// The position is not valid. Make sure that the line number exists in the version of the file you want to comment on.
    public static var invalidFilePositionException: Self { .init(.invalidFilePositionException) }
    /// The specified value for the number of conflict files to return is not valid.
    public static var invalidMaxConflictFilesException: Self { .init(.invalidMaxConflictFilesException) }
    /// The specified value for the number of merge hunks to return is not valid.
    public static var invalidMaxMergeHunksException: Self { .init(.invalidMaxMergeHunksException) }
    /// The specified number of maximum results is not valid.
    public static var invalidMaxResultsException: Self { .init(.invalidMaxResultsException) }
    /// The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations.
    public static var invalidMergeOptionException: Self { .init(.invalidMergeOptionException) }
    /// The specified sort order is not valid.
    public static var invalidOrderException: Self { .init(.invalidOrderException) }
    /// The override status is not valid. Valid statuses are OVERRIDE and REVOKE.
    public static var invalidOverrideStatusException: Self { .init(.invalidOverrideStatusException) }
    /// The parent commit ID is not valid. The commit ID cannot be empty, and must match the head commit ID for the branch of the repository where you want to add or update a file.
    public static var invalidParentCommitIdException: Self { .init(.invalidParentCommitIdException) }
    /// The specified path is not valid.
    public static var invalidPathException: Self { .init(.invalidPathException) }
    /// The pull request event type is not valid.
    public static var invalidPullRequestEventTypeException: Self { .init(.invalidPullRequestEventTypeException) }
    /// The pull request ID is not valid. Make sure that you have provided the full ID and that the pull request is in the specified repository, and then try again.
    public static var invalidPullRequestIdException: Self { .init(.invalidPullRequestIdException) }
    /// The pull request status is not valid. The only valid values are OPEN and CLOSED.
    public static var invalidPullRequestStatusException: Self { .init(.invalidPullRequestStatusException) }
    /// The pull request status update is not valid. The only valid update is from OPEN to CLOSED.
    public static var invalidPullRequestStatusUpdateException: Self { .init(.invalidPullRequestStatusUpdateException) }
    /// The Amazon Resource Name (ARN) of the user or identity is not valid.
    public static var invalidReactionUserArnException: Self { .init(.invalidReactionUserArnException) }
    /// The value of the reaction is not valid. For more information, see the AWS CodeCommit User Guide.
    public static var invalidReactionValueException: Self { .init(.invalidReactionValueException) }
    /// The specified reference name format is not valid. Reference names must conform to the Git references format (for example, refs/heads/master). For more information, see Git Internals - Git References or consult your Git documentation.
    public static var invalidReferenceNameException: Self { .init(.invalidReferenceNameException) }
    /// Either the enum is not in a valid format, or the specified file version enum is not valid in respect to the current file version.
    public static var invalidRelativeFileVersionEnumException: Self { .init(.invalidRelativeFileVersionEnumException) }
    /// Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.
    public static var invalidReplacementContentException: Self { .init(.invalidReplacementContentException) }
    /// Automerge was specified for resolving the conflict, but the specified replacement type is not valid.
    public static var invalidReplacementTypeException: Self { .init(.invalidReplacementTypeException) }
    /// The specified repository description is not valid.
    public static var invalidRepositoryDescriptionException: Self { .init(.invalidRepositoryDescriptionException) }
    /// A specified repository name is not valid.  This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.
    public static var invalidRepositoryNameException: Self { .init(.invalidRepositoryNameException) }
    /// One or more branch names specified for the trigger is not valid.
    public static var invalidRepositoryTriggerBranchNameException: Self { .init(.invalidRepositoryTriggerBranchNameException) }
    /// The custom data provided for the trigger is not valid.
    public static var invalidRepositoryTriggerCustomDataException: Self { .init(.invalidRepositoryTriggerCustomDataException) }
    /// The Amazon Resource Name (ARN) for the trigger is not valid for the specified destination. The most common reason for this error is that the ARN does not meet the requirements for the service type.
    public static var invalidRepositoryTriggerDestinationArnException: Self { .init(.invalidRepositoryTriggerDestinationArnException) }
    /// One or more events specified for the trigger is not valid. Check to make sure that all events specified match the requirements for allowed events.
    public static var invalidRepositoryTriggerEventsException: Self { .init(.invalidRepositoryTriggerEventsException) }
    /// The name of the trigger is not valid.
    public static var invalidRepositoryTriggerNameException: Self { .init(.invalidRepositoryTriggerNameException) }
    /// The AWS Region for the trigger target does not match the AWS Region for the repository. Triggers must be created in the same Region as the target for the trigger.
    public static var invalidRepositoryTriggerRegionException: Self { .init(.invalidRepositoryTriggerRegionException) }
    /// The value for the resource ARN is not valid. For more information about resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
    public static var invalidResourceArnException: Self { .init(.invalidResourceArnException) }
    /// The revision ID is not valid. Use GetPullRequest to determine the value.
    public static var invalidRevisionIdException: Self { .init(.invalidRevisionIdException) }
    /// The SHA-256 hash signature for the rule content is not valid.
    public static var invalidRuleContentSha256Exception: Self { .init(.invalidRuleContentSha256Exception) }
    /// The specified sort by value is not valid.
    public static var invalidSortByException: Self { .init(.invalidSortByException) }
    /// The source commit specifier is not valid. You must provide a valid branch name, tag, or full commit ID.
    public static var invalidSourceCommitSpecifierException: Self { .init(.invalidSourceCommitSpecifierException) }
    /// The specified tag is not valid. Key names cannot be prefixed with aws:.
    public static var invalidSystemTagUsageException: Self { .init(.invalidSystemTagUsageException) }
    /// The list of tags is not valid.
    public static var invalidTagKeysListException: Self { .init(.invalidTagKeysListException) }
    /// The map of tags is not valid.
    public static var invalidTagsMapException: Self { .init(.invalidTagsMapException) }
    /// The specified target branch is not valid.
    public static var invalidTargetBranchException: Self { .init(.invalidTargetBranchException) }
    /// The target for the pull request is not valid. A target must contain the full values for the repository name, source branch, and destination branch for the pull request.
    public static var invalidTargetException: Self { .init(.invalidTargetException) }
    /// The targets for the pull request is not valid or not in a valid format. Targets are a list of target objects. Each target object must contain the full values for the repository name, source branch, and destination branch for a pull request.
    public static var invalidTargetsException: Self { .init(.invalidTargetsException) }
    /// The title of the pull request is not valid. Pull request titles cannot exceed 100 characters in length.
    public static var invalidTitleException: Self { .init(.invalidTitleException) }
    /// The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.
    public static var manualMergeRequiredException: Self { .init(.manualMergeRequiredException) }
    /// The number of branches for the trigger was exceeded.
    public static var maximumBranchesExceededException: Self { .init(.maximumBranchesExceededException) }
    /// The number of allowed conflict resolution entries was exceeded.
    public static var maximumConflictResolutionEntriesExceededException: Self { .init(.maximumConflictResolutionEntriesExceededException) }
    /// The number of files to load exceeds the allowed limit.
    public static var maximumFileContentToLoadExceededException: Self { .init(.maximumFileContentToLoadExceededException) }
    /// The number of specified files to change as part of this commit exceeds the maximum number of files that can be changed in a single commit. Consider using a Git client for these changes.
    public static var maximumFileEntriesExceededException: Self { .init(.maximumFileEntriesExceededException) }
    /// The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.
    public static var maximumItemsToCompareExceededException: Self { .init(.maximumItemsToCompareExceededException) }
    /// The number of approvals required for the approval rule exceeds the maximum number allowed.
    public static var maximumNumberOfApprovalsExceededException: Self { .init(.maximumNumberOfApprovalsExceededException) }
    /// You cannot create the pull request because the repository has too many open pull requests. The maximum number of open pull requests for a repository is 1,000. Close one or more open pull requests, and then try again.
    public static var maximumOpenPullRequestsExceededException: Self { .init(.maximumOpenPullRequestsExceededException) }
    /// The maximum number of allowed repository names was exceeded. Currently, this number is 100.
    public static var maximumRepositoryNamesExceededException: Self { .init(.maximumRepositoryNamesExceededException) }
    /// The number of triggers allowed for the repository was exceeded.
    public static var maximumRepositoryTriggersExceededException: Self { .init(.maximumRepositoryTriggersExceededException) }
    /// The maximum number of approval rule templates for a repository has been exceeded. You cannot associate more than 25 approval rule templates with a repository.
    public static var maximumRuleTemplatesAssociatedWithRepositoryException: Self { .init(.maximumRuleTemplatesAssociatedWithRepositoryException) }
    /// A merge option or stategy is required, and none was provided.
    public static var mergeOptionRequiredException: Self { .init(.mergeOptionRequiredException) }
    /// More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.
    public static var multipleConflictResolutionEntriesException: Self { .init(.multipleConflictResolutionEntriesException) }
    /// You cannot include more than one repository in a pull request. Make sure you have specified only one repository name in your request, and then try again.
    public static var multipleRepositoriesInPullRequestException: Self { .init(.multipleRepositoriesInPullRequestException) }
    /// The user name is not valid because it has exceeded the character limit for author names.
    public static var nameLengthExceededException: Self { .init(.nameLengthExceededException) }
    /// The commit cannot be created because no changes will be made to the repository as a result of this commit. A commit must contain at least one change.
    public static var noChangeException: Self { .init(.noChangeException) }
    /// The maximum number of approval rule templates has been exceeded for this AWS Region.
    public static var numberOfRuleTemplatesExceededException: Self { .init(.numberOfRuleTemplatesExceededException) }
    /// The approval rule cannot be added. The pull request has the maximum number of approval rules associated with it.
    public static var numberOfRulesExceededException: Self { .init(.numberOfRulesExceededException) }
    /// The pull request has already had its approval rules set to override.
    public static var overrideAlreadySetException: Self { .init(.overrideAlreadySetException) }
    /// An override status is required, but no value was provided. Valid values include OVERRIDE and REVOKE.
    public static var overrideStatusRequiredException: Self { .init(.overrideStatusRequiredException) }
    /// The parent commit ID is not valid because it does not exist. The specified parent commit ID does not exist in the specified branch of the repository.
    public static var parentCommitDoesNotExistException: Self { .init(.parentCommitDoesNotExistException) }
    /// The file could not be added because the provided parent commit ID is not the current tip of the specified branch. To view the full commit ID of the current head of the branch, use GetBranch.
    public static var parentCommitIdOutdatedException: Self { .init(.parentCommitIdOutdatedException) }
    /// A parent commit ID is required. To view the full commit ID of a branch in a repository, use GetBranch or a Git command (for example, git pull or git log).
    public static var parentCommitIdRequiredException: Self { .init(.parentCommitIdRequiredException) }
    /// The specified path does not exist.
    public static var pathDoesNotExistException: Self { .init(.pathDoesNotExistException) }
    /// The folderPath for a location cannot be null.
    public static var pathRequiredException: Self { .init(.pathRequiredException) }
    /// The pull request status cannot be updated because it is already closed.
    public static var pullRequestAlreadyClosedException: Self { .init(.pullRequestAlreadyClosedException) }
    /// The pull request cannot be merged because one or more approval rules applied to the pull request have conditions that have not been met.
    public static var pullRequestApprovalRulesNotSatisfiedException: Self { .init(.pullRequestApprovalRulesNotSatisfiedException) }
    /// The approval cannot be applied because the user approving the pull request matches the user who created the pull request. You cannot approve a pull request that you created.
    public static var pullRequestCannotBeApprovedByAuthorException: Self { .init(.pullRequestCannotBeApprovedByAuthorException) }
    /// The pull request ID could not be found. Make sure that you have specified the correct repository name and pull request ID, and then try again.
    public static var pullRequestDoesNotExistException: Self { .init(.pullRequestDoesNotExistException) }
    /// A pull request ID is required, but none was provided.
    public static var pullRequestIdRequiredException: Self { .init(.pullRequestIdRequiredException) }
    /// A pull request status is required, but none was provided.
    public static var pullRequestStatusRequiredException: Self { .init(.pullRequestStatusRequiredException) }
    /// The commit cannot be created because one or more files specified in the commit reference both a file and a folder.
    public static var putFileEntryConflictException: Self { .init(.putFileEntryConflictException) }
    /// The number of reactions has been exceeded. Reactions are limited to one reaction per user for each individual comment ID.
    public static var reactionLimitExceededException: Self { .init(.reactionLimitExceededException) }
    /// A reaction value is required.
    public static var reactionValueRequiredException: Self { .init(.reactionValueRequiredException) }
    /// The specified reference does not exist. You must provide a full commit ID.
    public static var referenceDoesNotExistException: Self { .init(.referenceDoesNotExistException) }
    /// A reference name is required, but none was provided.
    public static var referenceNameRequiredException: Self { .init(.referenceNameRequiredException) }
    /// The specified reference is not a supported type.
    public static var referenceTypeNotSupportedException: Self { .init(.referenceTypeNotSupportedException) }
    /// USE_NEW_CONTENT was specified, but no replacement content has been provided.
    public static var replacementContentRequiredException: Self { .init(.replacementContentRequiredException) }
    /// A replacement type is required.
    public static var replacementTypeRequiredException: Self { .init(.replacementTypeRequiredException) }
    /// The specified repository does not exist.
    public static var repositoryDoesNotExistException: Self { .init(.repositoryDoesNotExistException) }
    /// A repository resource limit was exceeded.
    public static var repositoryLimitExceededException: Self { .init(.repositoryLimitExceededException) }
    /// The specified repository name already exists.
    public static var repositoryNameExistsException: Self { .init(.repositoryNameExistsException) }
    /// A repository name is required, but was not specified.
    public static var repositoryNameRequiredException: Self { .init(.repositoryNameRequiredException) }
    /// At least one repository name object is required, but was not specified.
    public static var repositoryNamesRequiredException: Self { .init(.repositoryNamesRequiredException) }
    /// The repository does not contain any pull requests with that pull request ID. Use GetPullRequest to verify the correct repository name for the pull request ID.
    public static var repositoryNotAssociatedWithPullRequestException: Self { .init(.repositoryNotAssociatedWithPullRequestException) }
    /// At least one branch name is required, but was not specified in the trigger configuration.
    public static var repositoryTriggerBranchNameListRequiredException: Self { .init(.repositoryTriggerBranchNameListRequiredException) }
    /// A destination ARN for the target service for the trigger is required, but was not specified.
    public static var repositoryTriggerDestinationArnRequiredException: Self { .init(.repositoryTriggerDestinationArnRequiredException) }
    /// At least one event for the trigger is required, but was not specified.
    public static var repositoryTriggerEventsListRequiredException: Self { .init(.repositoryTriggerEventsListRequiredException) }
    /// A name for the trigger is required, but was not specified.
    public static var repositoryTriggerNameRequiredException: Self { .init(.repositoryTriggerNameRequiredException) }
    /// The list of triggers for the repository is required, but was not specified.
    public static var repositoryTriggersListRequiredException: Self { .init(.repositoryTriggersListRequiredException) }
    /// A valid Amazon Resource Name (ARN) for an AWS CodeCommit resource is required. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
    public static var resourceArnRequiredException: Self { .init(.resourceArnRequiredException) }
    /// The commit cannot be created because one of the changes specifies copying or moving a .gitkeep file.
    public static var restrictedSourceFileException: Self { .init(.restrictedSourceFileException) }
    /// A revision ID is required, but was not provided.
    public static var revisionIdRequiredException: Self { .init(.revisionIdRequiredException) }
    /// The revision ID provided in the request does not match the current revision ID. Use GetPullRequest to retrieve the current revision ID.
    public static var revisionNotCurrentException: Self { .init(.revisionNotCurrentException) }
    /// The file was not added or updated because the content of the file is exactly the same as the content of that file in the repository and branch that you specified.
    public static var sameFileContentException: Self { .init(.sameFileContentException) }
    /// The commit cannot be created because one or more changes in this commit duplicate actions in the same file path. For example, you cannot make the same delete request to the same file in the same file path twice, or make a delete request and a move request to the same file as part of the same commit.
    public static var samePathRequestException: Self { .init(.samePathRequestException) }
    /// The source branch and destination branch for the pull request are the same. You must specify different branches for the source and destination.
    public static var sourceAndDestinationAreSameException: Self { .init(.sourceAndDestinationAreSameException) }
    /// The commit cannot be created because no source files or file content have been specified for the commit.
    public static var sourceFileOrContentRequiredException: Self { .init(.sourceFileOrContentRequiredException) }
    /// A list of tag keys is required. The list cannot be empty or null.
    public static var tagKeysListRequiredException: Self { .init(.tagKeysListRequiredException) }
    /// The tag policy is not valid.
    public static var tagPolicyException: Self { .init(.tagPolicyException) }
    /// A map of tags is required.
    public static var tagsMapRequiredException: Self { .init(.tagsMapRequiredException) }
    /// A pull request target is required. It cannot be empty or null. A pull request target must contain the full values for the repository name, source branch, and destination branch for the pull request.
    public static var targetRequiredException: Self { .init(.targetRequiredException) }
    /// An array of target objects is required. It cannot be empty or null.
    public static var targetsRequiredException: Self { .init(.targetsRequiredException) }
    /// The tip of the source branch in the destination repository does not match the tip of the source branch specified in your request. The pull request might have been updated. Make sure that you have the latest changes.
    public static var tipOfSourceReferenceIsDifferentException: Self { .init(.tipOfSourceReferenceIsDifferentException) }
    /// The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using git diff or a diff tool.
    public static var tipsDivergenceExceededException: Self { .init(.tipsDivergenceExceededException) }
    /// A pull request title is required. It cannot be empty or null.
    public static var titleRequiredException: Self { .init(.titleRequiredException) }
    /// The maximum number of tags for an AWS CodeCommit resource has been exceeded.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
}

extension CodeCommitErrorType: Equatable {
    public static func == (lhs: CodeCommitErrorType, rhs: CodeCommitErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CodeCommitErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
